package com.alkaid.manga.mapper;

import com.alkaid.commons.entity.Manga;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author Kylin
 */
@Mapper
public interface MangaMapper extends BaseMapper<Manga> {
    /**
     * 查询番剧热度排行榜
     *
     * @param num the num
     * @return 番剧列表 list
     */
    List<Manga> findHotList(int num);

    /**
     * 查询番剧播放排行榜
     *
     * @param num the num
     * @return 番剧列表 list
     */
    List<Manga> findCountList(int num);


    /**
     * Find all list.
     *
     * @param sql the sql
     * @return the list
     */
    Page<Manga> findAll(String sql);

    /**
     * Find by id anime do.
     *
     * @param id the id
     * @return the anime do
     */
    Manga findById(Integer id);
}
